<div class="modal-header">
	<h4 class="modal-title">{{item.copy?'复制':'编辑'}}样式</h4>
</div>
<div class="modal-body container-fluid form-horizontal">
	<form name="form" novalidate>
		<div class="form-group" ng-if="item.copy">
			<label class="col-xs-3 control-label required">复制到：</label>
			<div class="col-xs-8">
				<tree-selector  node-list="filteredSceneTree" need=true leaf-only=true host="item" host-key="'sceneId'" host-text="'sceneName'"  tip-text="'场景选择'"></tree-selector>
			</div>
		</div>
		<div class="form-group" >
			<label class="col-xs-3 control-label required">名称：</label>
			<div class="col-xs-8">
				<input type="text" class="form-control" ng-model="item.name" name="name" required
					   uib-tooltip="{{item.name && form.name.$invalid?'有重名':null}}"  id="{{item.copy?'':item.id}}" ensure-unique="name" api="../instance/checkUniqueName_mute"
				/>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-3 control-label required">图标文件夹：</label>
			<div class="col-xs-8">
				<select class="form-control" ng-model="item.folderId"  required
						ng-options="o.id as o.text for o in $root.folderList">
					<option value="">--请选择--</option></select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-3 control-label">描述：</label>
			<div class="col-xs-8">
				<input type="text" class="form-control" ng-model="item.comment" name="comment"   required/>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-3 control-label">xml键值：</label>
			<div class="col-xs-8" >
				<div ng-repeat="kv in keyValues track by $index"  style="margin-bottom: 5px;white-space: nowrap;">
					<input type="text" ng-model="keyValues[$index]" placeholder='key="" value=""'  class="form-control pull-left" required>
					<button class="btn btn-sm btn-default " style="margin: 2px 0 0 2px;"
							ng-click="keyValues.splice(keyValues.indexOf(kv),1)"><i class="glyphicon glyphicon-minus"></i></button>
				</div>
				<button class="btn btn-sm btn-default" ng-click="add()"><i class="glyphicon glyphicon-plus" ></i>添加样式</button>
			</div>
		</div>

	</form>
</div>
<div class="modal-footer">
	<button class="btn btn-primary" ng-click="save(form)">确定</button>
	<button class="btn btn-warning" ng-click="$dismiss()">取消</button>
</div>
